//package com.zmn.plat.admin.controller.base.servicecontent;
//
//import com.zmn.common.utils.number.NumberUtil;
//import com.zmn.plat.admin.controller.PlatBaseController;
//import com.zmn.plat.model.entity.base.servicecontent.ServiceContent;
//import com.zmn.plat.model.entity.base.servicecontent.ServiceContentQuery;
//import com.zmn.plat.services.interfaces.base.servicecontent.ServiceContentService;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.shiro.authz.annotation.RequiresPermissions;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.servlet.ModelAndView;
//
//import javax.annotation.Resource;
//import java.util.List;
//
//
///**
// * 服务内容基础查询Controller
// *
// * @author fengxuecai
// * @since 2021/11/17 14:19
// */
//@Slf4j
//@RestController
//@RequestMapping("/base/servicecontent")
//public class ServiceContentListController extends PlatBaseController {
//
//    @Resource
//    private ServiceContentService serviceContentService;
//
//    /**
//     * 描述: 查询列表
//     *
//     * @author fengxuecai
//     * @since 2021/11/17 14:19
//     */
//    @RequestMapping("/list")
//    @RequiresPermissions("/base/servicecontent/list.action")
//    public ModelAndView list(ServiceContentQuery query) {
//        ModelAndView mv = new ModelAndView("base/servicecontent/list");
//        try {
//            List<ServiceContent> items = serviceContentService.listPageByQuery(query);
//            mv.addObject("items", items);
//            mv.addObject("vo", query);
//        } catch (Exception e) {
//            log.error("查询失败,原因:{}, MSG:{}", e, e.getMessage());
//        }
//        return mv;
//    }
//
//    /**
//     * 描述: 详情
//     *
//     * @author fengxuecai
//     * @since 2021/11/17 14:19
//     */
//    @RequestMapping("/addEditView")
//    @RequiresPermissions("/base/servicecontent/addEditView.action")
//    public ModelAndView addEditView(@RequestParam(defaultValue = "0", value = "servId") Integer servId) {
//        ModelAndView mv = new ModelAndView("base/servicecontent/detail");
//        try {
//            ServiceContent serviceContent;
//            if (NumberUtil.isNullOrZero(servId)) {
//                serviceContent = new ServiceContent();
//                serviceContent.setServId(servId);
//            } else {
//                serviceContent = serviceContentService.findById(servId);
//            }
//            mv.addObject("serviceContent", serviceContent);
//        }catch (Exception e){
//            log.error("查询失败,原因:{}, MSG:{}", e, e.getMessage());
//        }
//        return mv;
//    }
//
//}
